package com.meisupic.copyright.repo;

import com.meisupic.copyright.domain.po.VipOrder;
import com.meisupic.copyright.domain.vo.VipUserVo;
import java.util.Date;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
 * @Author lanjian
 * @Date 2018/3/18 下午4:15
 */
public interface VipOrderRepo extends JpaRepository<VipOrder, Long>,
    JpaSpecificationExecutor<VipOrder> {

  VipOrder findVipOrderByUserIdAndOrderTimeAfter(Long userId, Date orderTime);


  VipOrder findVipOrderByInvalidTimeAfterAndUserIdAndPayStatusIs(Date currDate, Long userId,
      boolean payStatus);

  VipOrder findVipOrderByOrderNo(String orderNo);

}
